package javafoundations;

import junit.framework.TestCase;

/**
 * Created by zhangyunqi on 2017/10/9.
 */
 public   class ArrayStackTest extends TestCase {

        ArrayStack list = new ArrayStack () {
            @Override
            public boolean isEmpty() {
                return false;
            }
        };

        public void testIsEmpty() {

            assertEquals ( true, list.isEmpty () );

            list.push ( "My name is zhangyunqi" );
            list.push ( "20162307" );

            assertEquals ( false, list.isEmpty () );



        }

    public void testpop() {
        list.push ( 1);
        list.push ( 2 );
        list.push ( 8);
        list.pop ();
    }
    public void testpeek() {
        assertEquals ( null, list.peek () );
        list.push ( "20162307" );
        assertEquals ( "20162307", list.peek () );

    }
    public void testsize() {
        list.push ( 2 );
        list.push ( 3 );
        list.push ( 0 );
        list.push ( 7 );
        assertEquals ( 4, list.size () );
    }
    public void testtoString() {

    }
    }